<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>员工列表</title>
    <!-- 静态包含,静态包含会把jsp合并过来形成一个整个servlet输出. 动态会多个sevlet的结果合并 -->
    <%@include file="common/head.jsp" %>
    <!-- 引入jstl -->
    <%@include file="common/taglib.jsp" %>
    <!-- 项目公共 JavaScript 文件 -->
    <script src="/resources/js/common/common.js"></script>
    <script src="/resources/js/common/pageHandler.js"></script>
    <script src="/resources/js/yuangong.js"></script>
</head>
<body>
    <!-- 页面显示部分 -->
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                <div class="alert fade col-sm-offset-3 col-sm-4 text-center alert-msg" id="alertMsg"></div>
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="searchInput"  value="">
                            <input type="hidden" class="form-control" id="commitInput"  value="">
                            <input type="hidden" class="form-control" id="currentPage"  value="1">
                            <input type="hidden" class="form-control" id="pageNumber"  value="">
                            <input type="hidden" class="form-control" id="totalPage"  value="">
                        </div>
                        <div class="col-sm-9 text-right">
                            <button class="btn btn-default" onclick="zhigong.searchData('yuangong')">查询</button>
                            <button class="btn btn-default" onclick="zhigong.openModal('yuangong','new')">新增</button>
                        </div>
                    </div>
                </div>

                <div class="panel panel-default data-table" id="dataTable">
                    <div class="table-responsive">
                        <table class="table table-hover text-center">
                            <thead>
                            <tr>
                                <th>员工编号</th>
                                <th>姓名</th>
                                <th>手机</th>
                                <th>办公电话</th>
                                <th>部门</th>
                                <th>职位</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="tbodyList">

                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="page col-sm-12 text-right" id="pageWrap">
                    <ul class="pagination">
                        <li class="disabled"><a href="javascript:void(0);" onclick="prePage(this)">&laquo;</a></li>
                        <li class="active"><a href="javascript:void(0);" onclick="transPage(this, 'yuangong')">1</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'yuangong')">2</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'yuangong')">3</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'yuangong')">4</a></li>
                        <li><a href="javascript:void(0);" onclick="transPage(this, 'yuangong')">5</a></li>
                        <li><a href="javascript:void(0);" onclick="nextPage(this)" >&raquo;</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" tabindex="-1" role="dialog" id="dataModal">

        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">员工维护</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label for="ygbh" class="col-sm-2 col-sm-offset-1 control-label">员工编号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control prikey" id="ygbh" disabled value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="xm" class="col-sm-2 col-sm-offset-1 control-label">姓名</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="xm" value="" placeholder="请输入姓名">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="xb" class="col-sm-2 col-sm-offset-1 control-label">性别</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="xb" placeholder="请输入性别">
                                    <option value="1">男</option>
                                    <option value="2">女</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="rzrq" class="col-sm-2 col-sm-offset-1 control-label">入职日期</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control form-datepicker" id="rzrq" value="" placeholder="请选择入职日期">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="sfzh" class="col-sm-2 col-sm-offset-1 control-label">身份证号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="sfzh" value="" placeholder="请输入身份证号">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="csrq" class="col-sm-2 col-sm-offset-1 control-label">出生日期</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control form-datepicker" id="csrq" value="" placeholder="请选择出生日期">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="bmbh" class="col-sm-2 col-sm-offset-1 control-label">部门</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="bmbh" placeholder="请选择部门">

                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="zwbh" class="col-sm-2 col-sm-offset-1 control-label">职位</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="zwbh" placeholder="请选择部门">

                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="xl" class="col-sm-2 col-sm-offset-1 control-label">学历</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="xl" value="" placeholder="请输入学历">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="sj" class="col-sm-2 col-sm-offset-1 control-label">手机</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="sj" value="" placeholder="请输入手机">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="dh" class="col-sm-2 col-sm-offset-1 control-label">电话</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="dh" value="" placeholder="请输入电话">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="bz" class="col-sm-2 col-sm-offset-1 control-label">备注</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="bz" value="" placeholder="请输入备注">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="saveBtn" onclick="zhigong.saveData('yuangong')">保存</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 删除时弹出 -->
    <input type="hidden" id="common_confirm_btn" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#common_confirm_model">
    <div id="common_confirm_model" class="modal">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h5 class="modal-title"><i class="fa fa-exclamation-circle"></i> <span class="title"></span></h5>
                </div>
                <div class="modal-body small">
                    <p ><span class="message"></span></p>
                </div>
                <div class="modal-footer" >
                    <button type="button" class="btn btn-primary ok" data-dismiss="modal">确认</button>
                    <button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>

</body>
</html>